test(sprite3d): cover the WebGL draw path + CHANGELOG highlight#1519
Merged
Conversation
Follow-up to #1513. Adds an automated WebGL draw smoke for Sprite3d — the path that was previously only validated by the Billboard example screenshot (and where the getTexture regression once hid). `tests/sprite3d_webgl.spec.js` drives real Sprite3d instances through `WebGLRenderer.drawMesh` → `MeshBatcher` under a Camera3d and asserts the draw reaches the GPU (`drawElements > 0`) without throwing: - plain-image Sprite3d (the getTexture/atlas-resolution case) - animated spritesheet (atlas UVs uploaded) - alphaCutoff default 0.5 + the alphaCutoff:0 path (uniform set) - a flipped sprite Runs under software WebGL (failIfMajorPerformanceCaveat:false); skips when WebGL2 is unavailable, mirroring the existing webgl_mesh_depth harness. Also adds Sprite3d / 2.5D to the 19.8 CHANGELOG Highlights line (it was glTF-only). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Follow-up to #1513. Closes the one test gap identified during pre-release review:
Sprite3dwas never drawn through the WebGL path — the other specs run under Canvas and test the billboard/atlas/flip math directly, soSprite3d.draw → WebGLRenderer.drawMesh → MeshBatcher(texture upload,uAlphaCutoffuniform, atlas UVs reaching the GPU) was only ever validated by the Billboard example screenshot. That's exactly where thegetTextureregression once hid.New spec —
tests/sprite3d_webgl.spec.jsDrives real
Sprite3dinstances throughdrawMesh/MeshBatcherunder aCamera3dand asserts the draw reaches the GPU (drawElements > 0) without throwing:alphaCutoffdefault0.5and thealphaCutoff: 0path (uniform set both ways)Runs under software WebGL (
failIfMajorPerformanceCaveat: false); skips when WebGL2 is unavailable — same harness aswebgl_mesh_depth.spec.js, so it's CI-safe.Also
Adds
Sprite3d/ 2.5D to the 19.8 CHANGELOG Highlights line (it was glTF-only).Verified locally: the new spec runs (4 pass, not skipped) under software WebGL; full suite 4403 passing.
🤖 Generated with Claude Code